package com.buptlogistics.creditinvestigation.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;

import com.buptlogistics.creditinvestigation.R;
import com.buptlogistics.creditinvestigation.activity.CommonActivity;
import com.buptlogistics.creditinvestigation.app.BaseFragment;

/**
 * 包名：com.buptlogistics.creditinvestigation.fragment
 * 类描述：预付款
 * 创建人：fuxuemingzhu
 * 邮箱：fuxuemingzhu@163.com
 * 创建时间：2015/12/30 11:21
 * <p/>
 * 修改人：fuxuemingzhu
 * 修改时间：2015/12/30 11:21
 * 修改备注：
 *
 * @version 1.0
 */
public class DeserveFragment extends BaseFragment {

    private View view;

    private EditText et_deserve_loan_amount, et_deserve_use,
            et_deserve_name;
    private Button btn_next;

    public DeserveFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        view = inflater.inflate(R.layout.fragment_deserve, container, false);
        initViews();
        initEvents();
        return view;
    }

    protected void initViews() {
        et_deserve_loan_amount = (EditText) findViewById(R.id.et_deserve_loan_amount);
        et_deserve_use = (EditText) findViewById(R.id.et_deserve_use);
        btn_next = (Button) findViewById(R.id.btn_deserve_next);
    }

    protected void initEvents() {
        btn_next.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Bundle data = new Bundle();
                data.putInt("fragmentType", 3);
                // 创建一个Intent
                Intent intent = new Intent(DeserveFragment.this.getActivity(),
                        CommonActivity.class);
                intent.putExtras(data);
                // 启动intent对应的Activity
                startActivity(intent);

            }
        });
    }

    protected View findViewById(int id) {
        return view.findViewById(id);
    }

}
